<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title><%= h(@pageTitle || 'BLISS') %></title>
  <%= stylesheet_link_tag 'bliss_style' %>
  <%= javascript_include_tag :defaults %>
</head>
<body>

  <div id="header">
    <h2 class="center"><%= link_to h(@pageTitle || 'Bliss'), rooms_path %></h2>
<% if authenticated? -%>
    Vous &ecirc;tes identifi&eacute; par <%= h(current_user.firstname + ' ' + current_user.lastname) %>.
    <%= link_to 'Deconnexion', logout_path %>&nbsp;&nbsp;
<% elsif params[:action] != 'login' -%>
    Vous n'&ecirc;tes pas identifi&eacute;.
    <%= link_to 'Connexion', login_path %>|&nbsp;
<% end -%>
  </div>

  <div id="banner">
<% if flash[:error] -%>
      <p class="error"><%= escape_xml flash[:error] %></p>
<% end -%>
<% if flash[:notice] -%>
      <p class="notice"><%= escape_xml flash[:notice] %></p>
<% end -%>
  </div>

  <div id="left_tabs">
    <div class="nav_container">
      <ul class="nav_list">
        <li class="active"><%= link_to 'Salles', rooms_path %></li>
<% for room in Room.find :all -%>
        <li><%= link_to room.name, room_path(room) %></li>
<% end -%>
      </ul>
    </div>

    <div class="nav_container">
      <ul class="nav_list">
        <li class="active"><%= link_to 'Incidents', incidents_path %></li>
<% for incident in Incident.find :all, :conditions => ["resolve IS NULL OR resolve LIKE ''"] -%>
        <li><%= link_to incident.kind, incident_path(incident) %></li>
<% end -%>
      </ul>
    </div>
  </div>

  <div id="body">

  <%= yield %>

  </div>

  <div id="footer"> Pied de page </div>

</body>
</html>
